package net.airuima.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Table;
import net.airuima.domain.base.CustomBaseEntity;
import org.hibernate.annotations.*;

import jakarta.persistence.*;
import jakarta.validation.constraints.*;
import org.hibernate.annotations.Cache;

import java.io.Serializable;
import java.time.*;
import java.util.Objects;

/**
 * Copyright (C), 2017-2023, 武汉睿码智能科技有限公司
 * Domain
 *
 * @author ruima
 * @date 2024-02-06
 */
@Schema(description = "")
@Entity
@Table(name = "notebook")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@DynamicInsert
@DynamicUpdate
public class Notebook extends CustomBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 消息
     */
    @Schema(description = "消息")
    @Column(name = "message")
    private String message;

    /**
     * 注释
     */
    @Schema(description = "注释")
    @Column(name = "note")
    private String note;


    public String getMessage() {
        return message;
    }

    public Notebook setMessage(String message) {
        this.message = message;
        return this;
    }

    public String getNote() {
        return note;
    }

    public Notebook setNote(String note) {
        this.note = note;
        return this;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Notebook notebook = (Notebook) o;
        if (notebook.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), notebook.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

}
